#define _CRT_SECURE_NO_WARNINGS 1
#include<stdio.h>
int my_strlen(char* arr)
{
	int cnt = 0;
	while (*arr != '\0')
	{
		cnt++;
		arr++;
	}
	return cnt;
}
 void reverse_string(char* str)
{
	 int len = my_strlen(str);
	 char temp = *str;
	 *str = *(str + len - 1);
	 *(str + len - 1) = '\0';
	 if(my_strlen(str + 1) >= 2)
	 {
		 reverse_string(str + 1);
	 }
	 *(str + len - 1) = temp;
}
int main()
{
	char arr[] = "abcdef";
	reverse_string(arr);
	printf("%s\n", arr);
	return 0;
}